<link rel="stylesheet" href="__CDN__/assets/addons/workorder/css/detail.css">
<div class="container">
    <div id="content-container" class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-body">

                        <!--工程师信息-->
                        {volist name="engineers" id="engineer"}
                        <div class="engineer_info engineer_info_{$engineer.id} col-xs-12 {$engineer.id == $row.engineer_id ? 'visible-xs':'hidden'}">
                            <div class="col-xs-12 basic_info">
                                <img class="img-circle" src="{$engineer.user.avatar|default='__CDN__/assets/img/avatar.png'}" alt="">
                                <div class="basic_info_box">
                                    <p class="basic_info_name">{$engineer.title}</p>
                                    <p class="basic_info_desc">{$engineer.introduce}</p>
                                </div>
                            </div>
                            <div class="col-xs-12 expend_info">
                                {if $engineer.all_order_number}
                                <div class="col-xs-12 expend_info_item">
                                    <div class="col-xs-6">处理工单数</div>
                                    <div class="col-xs-6">{$engineer.all_order_number}</div>
                                </div>
                                {/if}
                                {present name="$engineer.average_solve_time"}
                                <div class="col-xs-12 expend_info_item">
                                    <div class="col-xs-6">平均解决时间</div>
                                    <div class="col-xs-6">{$engineer.average_solve_time}</div>
                                </div>
                                {/present}
                                {present name="$engineer.average_first_response"}
                                <div class="col-xs-12 expend_info_item">
                                    <div class="col-xs-6">平均首次响应</div>
                                    <div class="col-xs-6">{$engineer.average_first_response}</div>
                                </div>
                                {/present}
                                <div class="col-xs-12 expend_info_item {$engineer.wx ? '':'hidden'}">
                                    <div class="col-xs-6">微信号</div>
                                    <div class="col-xs-6">{$engineer.wx}</div>
                                </div>
                                <div class="col-xs-12 expend_info_item {$engineer.qq ? '':'hidden'}">
                                    <div class="col-xs-6">QQ号</div>
                                    <div class="col-xs-6">{$engineer.qq}</div>
                                </div>
                                <div class="col-xs-12 expend_info_item {$engineer.user.mobile ? '':'hidden'}">
                                    <div class="col-xs-6">手机号</div>
                                    <div class="col-xs-6">{$engineer.user.mobile}</div>
                                </div>
                                <div class="col-xs-12 expend_info_item {$engineer.user.email ? '':'hidden'}">
                                    <div class="col-xs-6">邮箱</div>
                                    <div class="col-xs-6">{$engineer.user.email}</div>
                                </div>
                            </div>
                        </div>
                        {/volist}

                        <!--用户信息(供鼠标移入头像显示)-->
                        <div class="engineer_info user_info col-xs-12 hidden">
                            <div class="col-xs-12 basic_info border-none">
                                <img class="img-circle" src="{$row.user.avatar|default='__CDN__/assets/img/avatar.png'}" alt="">
                                <div class="basic_info_box">
                                    <p class="basic_info_name">{$row.user.nickname}</p>
                                    <p class="basic_info_desc">{$row.user.bio}</p>
                                </div>
                            </div>
                        </div>

                        <!--沟通记录-->
                        <div class="detail-content">
                            <p class="detail-content-title">沟通记录</p>
                            <div class="detail-content-list">
                                <ul id="message_items" class="list_items">
                                    {volist name="records" id="record" empty="<div class='empty_record'>暂时还没有沟通记录...</div>"}
                                    <li class="list_item">
                                        <div class="item_meta item_meta_{$isUser ? ($record.sender == 'user' ? 'user':'engineer'):($record.sender == 'user' ? 'engineer':'user')}">
                                            <div class="item_meta_avatar">
                                                {eq name="record.sender" value="engineer"}
                                                <div rel="engineer_popo" data-placement="left" data-toggle="popover" data-engineer_id="{$record.engineer.id}" title="{$record.engineer.title}" class="avatar_img">
                                                    <img class="img-circle" src="{$record.engineer.user.avatar|default='__CDN__/assets/img/avatar.png'}">
                                                </div>
                                                {else/}
                                                <div rel="userInfo_popo" data-toggle="popover" title="{$row.user.nickname}" class="avatar_img">
                                                    <img class="img-circle" src="{$row.user.avatar|default='__CDN__/assets/img/avatar.png'}">
                                                </div>
                                                {/eq}
                                            </div>
                                            <div class="item_meta_content_box">
                                                <div class="item_meta_content">
                                                    <div>
                                                        <div class="item_meta_createtime">{$record.createtime_text}&nbsp;&nbsp;&nbsp;&nbsp;{$record.sender == 'engineer' ? $record.engineer.title:$row.user.nickname}</div>
                                                        <div class="item_meta_text">{$record.message}</div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                    {/volist}
                                </ul>
                            </div>
                        </div>

                        <!--工单信息-->
                        <div class="row detail">
                            <div class="col-md-4 detail_item">编号：{$row.id}</div>
                            {volist name="basicField" id="field"}
                            <div class="col-md-4 detail_item">{$field.title}：{$field.value}</div>
                            {/volist}
                            <div class="col-md-4 detail_item">相关产品/服务：{$row.category.name}</div>
                            <div class="col-md-4 detail_item">紧急程度：{$row.urgentrank.name}</div>
                            <div class="col-md-4 detail_item">状态：{$row.status}</div>
                            <div class="col-md-4 detail_item hidden-xs">创建时间：{$row.createtime}</div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>